package pkg

import (
	"crypto/md5"
	"fmt"
	"math/rand"
	"strconv"
)

func Md5(str string) string {
	data := []byte(str)
	has := md5.Sum(data)
	return fmt.Sprintf("%x", has)
}

func RandINTN() string {
	code := strconv.Itoa(rand.Intn(900000) + 100000)
	return code
}
